package cn.phecda.boot.common.lang.web;

import org.springframework.web.client.RestClient;
import org.springframework.web.util.DefaultUriBuilderFactory;

/**
 * <p> 访问web url 接口 </p>
 *
 * @author : wanpinwei
 */
public interface RestClientApi {
    String getBaseUrl();

    default RestClient.Builder restClientBuilder() {
        DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(getBaseUrl());

        return RestClient.builder().uriBuilderFactory(factory);
    }

}
